import java.util.Scanner;

public class Lyrics {
	
	String trackID;
	static String trackName;
	static String artistName;
	static String songid;
	static String[] result = new String[3];
	static Emotion checkEmotion;
	
	public static void main(String[] args) {
		
		DBConnection.getConnection();
		//checkEmotion = new Emotion();
		int start;
		int end;
		
		//select range of lyrics from track_meta.db
		Scanner numbers = new Scanner(System.in);
		System.out.println("Enter start ID");
		start = numbers.nextInt();
		System.out.println("Enter end ID");
		end = numbers.nextInt();
		/*int end=1000000;
		songid = "TRMQSZG12903CA04D5";
		artistName = "The Black Eyed Peas";
		trackName = "Shut Up";
		
		try{
			checkEmotion = new Emotion("12934","TRMQSZG12903CA04D5", "The Black Eyed Peas", "Shut Up");
			checkEmotion = new Emotion("48","SOWWQXA12A81C1F9CA", "billyidol", "scream");
			checkEmotion = new Emotion("54","SOHMYGC12A6D4FAC4B", "dianakrall", "dancinginthedark");
			checkEmotion = new Emotion("200184","SOPIDIT12A8C14496D", "nataliecole", "butbeautiful");
			checkEmotion = new Emotion("3","SOGTUKN12AB017F4F1", "whitneyhouston", "iwillalwaysloveyou");
		}
		catch(NullPointerException e){
			e.printStackTrace();
		}*/
		for(int currentTrack = start; currentTrack <= end; currentTrack++) {
			
			result = DBConnection.insertQuery(currentTrack);
			songid = result[0];
			//trackName = result[1];
			//artistName = result[2];
			
			try{
				//checkEmotion.Emotion(currentTrack, songid, artistName, trackName);
				//checkEmotion.Emotion(songid, artistName, trackName);
				checkEmotion = new Emotion(Integer.toString(currentTrack), songid);
				System.out.println(currentTrack);
			}
			catch(NullPointerException e){
				
			}
	

		} //end for-loop
		DBConnection.closeConnection();
	}
	
}
